package com.ruoyi.user.service.impl;

import com.ruoyi.common.utils.DateUtils;

import com.ruoyi.user.domain.FamilyImage1;
import com.ruoyi.user.mapper.FamilyImage1Mapper;
import com.ruoyi.user.service.IFamilyImage1Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 家庭图片Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-30
 */
@Service
public class FamilyImage1ServiceImpl implements IFamilyImage1Service
{
    @Autowired
    private FamilyImage1Mapper familyImage1Mapper;

    /**
     * 查询家庭图片
     * 
     * @param id 家庭图片主键
     * @return 家庭图片
     */
    @Override
    public FamilyImage1 selectFamilyImageById(Long id)
    {
        return familyImage1Mapper.selectFamilyImageById(id);
    }

    /**
     * 查询家庭图片列表
     * 
     * @param familyImage1 家庭图片
     * @return 家庭图片
     */
    @Override
    public List<FamilyImage1> selectFamilyImageList(FamilyImage1 familyImage1)
    {
        return familyImage1Mapper.selectFamilyImageList(familyImage1);
    }

    /**
     * 新增家庭图片
     * 
     * @param familyImage1 家庭图片
     * @return 结果
     */
    @Override
    public int insertFamilyImage(FamilyImage1 familyImage1)
    {
        familyImage1.setCreateTime(DateUtils.getNowDate());
        return familyImage1Mapper.insertFamilyImage(familyImage1);
    }

    /**
     * 修改家庭图片
     * 
     * @param familyImage1 家庭图片
     * @return 结果
     */
    @Override
    public int updateFamilyImage(FamilyImage1 familyImage1)
    {
        familyImage1.setUpdateTime(DateUtils.getNowDate());
        return familyImage1Mapper.updateFamilyImage(familyImage1);
    }

    /**
     * 批量删除家庭图片
     * 
     * @param ids 需要删除的家庭图片主键
     * @return 结果
     */
    @Override
    public int deleteFamilyImageByIds(Long[] ids)
    {
        return familyImage1Mapper.deleteFamilyImageByIds(ids);
    }

    /**
     * 删除家庭图片信息
     * 
     * @param id 家庭图片主键
     * @return 结果
     */
    @Override
    public int deleteFamilyImageById(Long id)
    {
        return familyImage1Mapper.deleteFamilyImageById(id);
    }
}
